#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <iostream>
#include <vector>
#include <unistd.h>
#include "myString.hpp"

using namespace std;

void Print(MyString &s){
    cout<<"empty: "<<s.empty()<<endl;
    cout<<"size: "<<s.size()<<endl;
    cout<<"capacity: "<<s.capacity()<<endl;
    cout<<"date: "<<s<<endl;

    cout<<endl;
}

void tese1(){
    MyString s1(5, 'a');
    Print(s1);

    MyString s2("123456789012345");
    s2.reserve(10);
    s2[2] = 'y';
    Print(s2);
    MyString s3(s1);
    Print(s3);
    s3 = "hello word";

    Print(s3);
    const char *p = s3.c_str();
    cout<<p<<endl;
    MyString s4 = "123456";
    Print(s4);
    cout<<("6">s4)<<endl;
    cout<<("6"<s4)<<endl;

    const MyString s5("123456");
    cout<<"s5:"<<s5[2]<<endl;
    cout<<(s1==s2)<<endl;
    cin>>s1>>s2;
    cout<<"s1: "<<s1<<"s2: "<<s2<<endl;
    
    cout<<s1<<endl;
}

int main()
{
    tese1(); 
    return 0;
}

